﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

using Rockfan.Framework;
using Rockfan.Framework.Audio;
using Rockfan.Framework.Entities;
using Rockfan.Framework.Entities.Interfaces;
using Rockfan.Framework.Graphics;

namespace Rockfan.Scenes
{
    public sealed class TestScene : Scene
    {
        //private Song Song;
        //private Sprite Sprite;

        public TestScene()
            : base("TestSceneContent") { }

        public override void Load()
        {
            //Camera.Z = 20;
            //var textureLocation = @"Content\defaultStage.png";

            //using (var fStream = File.OpenRead(textureLocation))
            //    Sprite = new Sprite(Texture2D.FromStream(EngineServices.GraphicsDevice, fStream));

            //Sprite.XScale = Camera.GetXScaleAtDistance(Sprite.Z);
            //Sprite.YScale = Camera.GetYScaleAtDistance(Sprite.Z);

            //Add(Sprite);

            //var str = new string[]
            //{
            //    @"Content\Songs\Avenged Sevenfold\song.ogg",
            //    @"Content\Songs\Avenged Sevenfold\guitar.ogg",
            //    @"Content\Songs\Avenged Sevenfold\rhythm.ogg"               
            //};

            //Song = new Song("Avenged Sevenfold");

            //foreach (var trackStr in str)
            //{
            //    var track = Song.CreateTrack(trackStr);

            //    if (!trackStr.EndsWith("song.ogg"))
            //        track.Volume = 25.0f;

            //    else track.Volume = 50.0f;
            //}

            //Song.Play();
            
            base.Load();
        }

        public override void Activity(bool isFirstCall)
        {
            //Sprite.XRotation += EngineServices.ElapsedGameTime * 2.65f;
        }
        
        protected override void Destroy()
        {

        }

        public static string GetFullName()
        {
            return typeof(TestScene).FullName;
        }
    }
}
